﻿<Window x:Class="SaryaAccounting.Window2"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window2" Height="325" Width="412">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Windows/Customer/ResourceDictionary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Grid.Row="0" Name="border1" Height="60" VerticalAlignment="Top" 
                Style="{StaticResource InformationMessageBorder}">
        </Border>
        <Grid Name="grid1" Grid.Row="1" Margin="0,5,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            
            <TextBlock Grid.Row="0" Grid.Column="0" Text="Color ID: " />
            <TextBox Name="txtColorID" Grid.Row="0" Grid.Column="1" Height="21" Margin="0,0,0,5" 
                     Text="{Binding Path=BusinessObject.ColorID, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" />
            
            <TextBlock Grid.Row="1" Grid.Column="0" Text="Name: " />
            <TextBox Name="txtColorName" Grid.Row="1" Grid.Column="1" Height="21" Margin="0,0,0,5"
                     Text="{Binding Path=BusinessObject.ColorName, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"/>

            <TextBlock Grid.Row="2" Grid.Column="0" Text="Sample: " />
            <TextBox Name="txtSample" Grid.Row="2" Grid.Column="1" Height="21" Margin="0,0,0,5" 
                     Text="{Binding Path=BusinessObject.Sample, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" />

            <TextBlock Name="txtError" Text="{Binding Path=BusinessObject.Error, UpdateSourceTrigger=Default}" Grid.Row="3" Grid.ColumnSpan="2" />
            
            <Button Grid.Row="4" Grid.Column="1" Width="75" Height="25" Command="{Binding Path=NewCommand}">New Color</Button>
            <CheckBox Content="{Binding ElementName=txtColorName, Path=(Validation.HasError)}" Grid.Column="1" Grid.Row="4" Height="16" HorizontalAlignment="Left" Margin="26,4,0,0" Name="checkBox1" VerticalAlignment="Top">
            </CheckBox>
        </Grid>
    </Grid>
</Window>
